Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecations slated for 24.3 #5203

Merged
merged 21 commits into from
Mar 8, 2024
Merged

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Feb 29, 2024

Description

Changes:

  • Bumps minimum conda to 23.5.0 (due to incompatibilities with conda.core.subdir_data.SubdirData._process_raw_repodata)
  • Removes signifiant portion of conda_build.index (part of switch to conda-index)
  • Removes conda_build.environ.get_install_actions in favor of conda_build.environ.get_package_records (part of deprecating conda.models.dist.Dist)
  • More untangling of conda.exports and conda_build.conda_interface

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Feb 29, 2024
@kenodegard kenodegard added this to the 24.3.x milestone Mar 5, 2024
Comment on lines +877 to +880
# NOTE: The function has to retain the "get_install_actions" name for now since
# conda_libmamba_solver.solver.LibMambaSolver._called_from_conda_build
# checks for this name in the call stack explicitly.
def get_install_actions(
Copy link
Contributor Author

@kenodegard kenodegard Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one stumped me for a bit, thankfully @mbargull had already debugged this for the install_actions function

cc @jaimergp @jezdez

@kenodegard kenodegard marked this pull request as ready for review March 8, 2024 05:12
@kenodegard kenodegard requested a review from a team as a code owner March 8, 2024 05:12
conda_build/cli/main_render.py Show resolved Hide resolved
conda_build/inspect_pkg.py Show resolved Hide resolved
@@ -30,7 +30,7 @@ requirements:
run:
- beautifulsoup4
- chardet
- conda >=22.11.0
- conda >=23.5.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE!

@jezdez jezdez merged commit 5353b38 into conda:main Mar 8, 2024
26 checks passed
@kenodegard kenodegard deleted the deprecations branch March 8, 2024 15:57
Comment on lines -427 to -475
@deprecated(
"24.1.0", "24.5.0", addendum="Use `conda_index._apply_instructions` instead."
)
def _apply_instructions(subdir, repodata, instructions):
repodata.setdefault("removed", [])
utils.merge_or_update_dict(
repodata.get("packages", {}),
instructions.get("packages", {}),
merge=False,
add_missing_keys=False,
)
# we could have totally separate instructions for .conda than .tar.bz2, but it's easier if we assume
# that a similarly-named .tar.bz2 file is the same content as .conda, and shares fixes
new_pkg_fixes = {
k.replace(CONDA_PACKAGE_EXTENSION_V1, CONDA_PACKAGE_EXTENSION_V2): v
for k, v in instructions.get("packages", {}).items()
}

utils.merge_or_update_dict(
repodata.get("packages.conda", {}),
new_pkg_fixes,
merge=False,
add_missing_keys=False,
)
utils.merge_or_update_dict(
repodata.get("packages.conda", {}),
instructions.get("packages.conda", {}),
merge=False,
add_missing_keys=False,
)

for fn in instructions.get("revoke", ()):
for key in ("packages", "packages.conda"):
if fn.endswith(CONDA_PACKAGE_EXTENSION_V1) and key == "packages.conda":
fn = fn.replace(CONDA_PACKAGE_EXTENSION_V1, CONDA_PACKAGE_EXTENSION_V2)
if fn in repodata[key]:
repodata[key][fn]["revoked"] = True
repodata[key][fn]["depends"].append("package_has_been_revoked")

for fn in instructions.get("remove", ()):
for key in ("packages", "packages.conda"):
if fn.endswith(CONDA_PACKAGE_EXTENSION_V1) and key == "packages.conda":
fn = fn.replace(CONDA_PACKAGE_EXTENSION_V1, CONDA_PACKAGE_EXTENSION_V2)
popped = repodata[key].pop(fn, None)
if popped:
repodata["removed"].append(fn)
repodata["removed"].sort()

return repodata
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is slated for removal in 24.5 at the earliest.
We have downstream code to adjust beforehand.
See #5152 (comment) .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressing this in gh-5226 .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants